package com.shop.mapper;

import com.shop.vo.ProductAggregationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.shop.entity.ProductSku;

import java.util.List;

@Mapper
public interface ProductSkuMapper {
    List<ProductSku> listProductSku(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize);

    List<ProductSku> listWithProductSku(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize);

    ProductSku listProductSkuByProductId(@Param("productId") Integer productId);

    void addProductSku(ProductSku productSku);

    void deleteProductSku(Integer id);

    void updateProductSku(
            @Param("id") int id,
            @Param("skuCode") String skuCode,
            @Param("price") double price,
            @Param("stock") int stock);
    int getTotal();
}
